
import matplotlib.pyplot as plt
arr = [[0 for x in xrange(2)] for x in xrange(2)] 
arr[0][0]=0.01
arr[0][1] = 0.01
arr[1][0] = 0.9
arr[1][1] = 0.8
       
plt.close('all')
fig = plt.figure(figsize=(4, 4))

im=plt.imshow(arr, interpolation="none")

from mpl_toolkits.axes_grid1 import make_axes_locatable
divider = make_axes_locatable(plt.gca())
cax = divider.append_axes("right", "5%", pad="3%")
plt.colorbar(im, cax=cax)
plt.ylabel(["hi", "ram"])
plt.tight_layout()
plt.show()
"""
import numpy as np
import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(111)

t = np.arange(0.0, 5.0, 0.01)
s = np.cos(2*np.pi*t)
line, = ax.plot(t, s, lw=2)

ax.annotate('local max', xy=(2, 1), xytext=(3, 1.5),
            arrowprops=dict(facecolor='black', shrink=0.05),
            )

ax.set_ylim(-2,2)
plt.show()
"""